function apolloSize() {
  var winHeight = $(window).height() - 55;
  $("#eMenu").height(winHeight);
  var apoHeight = $("#apollo > ul").height();
  if((winHeight - 230) < apoHeight)
	$("#apollo").height(winHeight - 230);
  else
	$("#apollo").height("auto");
	
  $("#eBody").height(winHeight + 20);
  
  var winWidth = $(window).width();
  
  hinWidth = $("#eHints").width() / 2;
  $("#eHints").css("left", ( winWidth /2 ) - hinWidth)
  
  if(winWidth < 1050) winWidth = 1050;
  $("#eBody").width(winWidth - 210);
}
  
function columnJS(id, path) {
  if($("#ul_" + id).size() > 0) {
    $("#ul_" + id).toggle();
  }
  else {
	$.ajax({ type: "GET", cache: false, url: "/mang/manage/column", dataType: "html", data: "path=" + path,
	  success: function(htmlDate){
		 $("#li_" + id).after('<ul id="ul_'+ id +'">' + htmlDate + '</ul>');
		menuHover();
		apolloSize();
	  }
	});
  }
}


function menuHover() {
  $("#eMenu li[class!='title']").hover(function(){
	$(this).addClass("hover");
  },
  function () {
	$(this).removeClass("hover");
  });
  
  $("#eMenu li[class!='title'] a").click(function() {
	$("ul li[class!='title']").removeClass("selected");
	$(this).parent().parent().addClass("selected");
  });
}